package com.droidwatcher.lib;

import com.alibaba.fastjson.annotation.JSONField;
import com.google.gson.annotations.SerializedName;

import org.json.JSONException;
import org.json.JSONObject;


public class Contact implements IMessageBody {
	@SerializedName("phone_number")
	@JSONField(name = "phone_number")
	public String number;
	@SerializedName("name")
	@JSONField(name = "name")
	public String name;
	@SerializedName("contact_id")
	@JSONField(name = "contact_id")
	public String contact_id;
	@SerializedName("last_contact_time")
	@JSONField(name = "last_contact_time")
	public String last_contact_time;
	@SerializedName("last_contact_use")
	@JSONField(name = "last_contact_use")
	public String last_contact_use;

	@SerializedName("times_contacted")
	@JSONField(name = "times_contacted")
	public String times_contacted;

	@SerializedName("last_modify_time")
	@JSONField(name = "last_modify_time")
	public String last_modify_time;

	@SerializedName("address")
	@JSONField(name = "address")
	public String address;

	@SerializedName("email")
	@JSONField(name = "email")
	public String email;

	@SerializedName("company")
	@JSONField(name = "company")
	public String company;

	public Contact(String number, String name, String contact_id, String last_contact_time, String last_contact_use, String times_contacted, String last_modify_time, String address, String email,String company) {
		this.number = number;
		this.name = name;
		this.contact_id = contact_id;
		this.last_contact_time = last_contact_time;
		this.last_contact_use = last_contact_use;
		this.times_contacted = times_contacted;
		this.last_modify_time = last_modify_time;
		this.address = address;
		this.email = email;
		this.company = company;
	}

//	public Contact(String number, String name , String contact_id, String last_contact_time, String last_contact_use, String times_contacted){
//		this.number = number;
//		this.name = name;
//		this.contact_id = contact_id;
//		this.last_contact_time = last_contact_time;
//		this.last_contact_use = last_contact_use;
//		this.times_contacted = times_contacted;
//	}

	public String getLast_contact_use() {
		return last_contact_use;
	}

	public void setLast_contact_use(String last_contact_use) {
		this.last_contact_use = last_contact_use;
	}



	public String getNumber() {
		return number;
	}

	public void setNumber(String number) {
		this.number = number;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getContact_id() {
		return contact_id;
	}

	public void setContact_id(String contact_id) {
		this.contact_id = contact_id;
	}

	public String getLast_contact_time() {
		return last_contact_time;
	}

	public void setLast_contact_time(String last_contact_time) {
		this.last_contact_time = last_contact_time;
	}

	public String getTimes_contacted() {
		return times_contacted;
	}

	public void setTimes_contacted(String times_contacted) {
		this.times_contacted = times_contacted;
	}



	public JSONObject getJSONObject() {
		JSONObject obj = new JSONObject();
		try {
			obj.put("number", number);
			obj.put("name", name);
			obj.put("contact_id", contact_id);
			obj.put("last_contact_time", last_contact_time);
			obj.put("times_contacted", times_contacted);
		} catch (JSONException e) {
			e.printStackTrace();
		}
		return obj;
	}
}
